package org.ftc.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.ftc.util.Util;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "ROLE_AUTH")
//@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class RoleAuth extends BasicEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3544023210303342577L;

	@Id 
	@Column(name = "ROLE_SEQ", length = 50 )
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid")
	private String roleSeq;
	
	@Column(name = "AUTH_NAME", length = 80) 
	private String authName;
	
	@Column(name = "AUTHS", length = 1000) 
	private String auths;
	
	public String getRoleSeq() {
		return roleSeq;
	}

	public void setRoleSeq(String roleSeq) {
		this.roleSeq = roleSeq;
	}

	public String getAuthName() {
		return authName;
	}

	public void setAuthName(String authName) {
		this.authName = authName;
	}

	public String getAuths() {
		return auths;
	}

	public void setAuths(String auths) {
		this.auths = auths;
	}
	
	public String[] getRoleAuth() {
		return Util.stringToArray(auths);
	}

	public void setRoleAuth(String[] auths) {
		this.auths = Util.arrayToString( auths );
	}
	
}
